<template>
	<view class="w-100">
		<view class="flex-1 mx-3">
			<view class="flex-1 row-a-j-fc mt-2">
				<view class="row-ac font-s-4">
					<view class="mr-2">标题:</view>
					<view>{{ reportDetail.title }}</view>
				</view>
				<view class="row-ac font-s-2 text-muted mt-1">
					<view class="mr-2">提交时间:</view>
					<view class="">{{ reportDetail.created_time }}</view>
				</view>
			</view>
			<view class="mt-5">
				<view class="font-s-35 font-w-600">报告内容：</view>
				<view class="flex-1 mt-2" style="white-space: pre-line;">
					{{ reportDetail.content }}
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import {
	  workreportDetailUrl
	} from '@/api/index.js';
	import {
		formatRichText
	} from '@/utils/util';
	export default {
		data(){
			return{
				reportDetail:''
			}
		},
		onLoad(options) {
			this.getWorkreportDetail(options.reportId)
		},
		methods:{
			getWorkreportDetail(reportId){
				this.$R.get(workreportDetailUrl + reportId + '/').then(res=>{
					if(res.code == 200){
						this.reportDetail = res.data
						console.log(this.reportDetail);
						this.reportDetail.content = formatRichText(res.data.content);
					}
				})
			}
		}
	}
</script>

<style>
</style>